package com.tea.Model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 商家动态分类实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("dynamic_type")
public class DynamicType {
    
    @TableId(type = IdType.AUTO)
    private Long dynamicTypeId;
    
    private String typeName;     // 分类名称
    
    private String description;  // 分类描述
    
    private Integer sortOrder;   // 排序字段，数值越小排序越靠前
    
    @TableLogic
    private Integer deleted;     // 逻辑删除：0-未删除 1-已删除
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
}